package test4.test4_18;

import test4.test4_18.interfaces.Solid;

/**
 * Globe
 */
public class Globe implements Solid {
  private double r;

  Globe(double r) {
    this.r = r;
  }

  public double area() {
    return 4 * Math.PI * Math.pow(this.r, 2);
  }

  public double volume() {
    return (4.0 / 3.0) * Math.PI * Math.pow(this.r, 3);
  }

  public static void main(String[] args) {
    Globe globe = new Globe(8);
    System.out.println(globe.area());
    System.out.println(globe.volume());
  }
}